<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Os1: DUtils::Random::UnrepeatedRandomizer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Os1
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">OrbSlam2 documentado y modificado</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_d_utils_1_1_random_1_1_unrepeated_randomizer.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DUtils::Random::UnrepeatedRandomizer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides pseudo-random numbers with no repetitions.  
 <a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_random_8h_source.html">Random.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4f93a3ab99e3e801d0c1d2599917a37a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a4f93a3ab99e3e801d0c1d2599917a37a">empty</a> () const</td></tr>
<tr class="memdesc:a4f93a3ab99e3e801d0c1d2599917a37a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether all the possible values between min and max were already given.  <a href="#a4f93a3ab99e3e801d0c1d2599917a37a">More...</a><br /></td></tr>
<tr class="separator:a4f93a3ab99e3e801d0c1d2599917a37a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1bf6a140e322962f65b2c98dc07a3ac"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#ae1bf6a140e322962f65b2c98dc07a3ac">get</a> ()</td></tr>
<tr class="memdesc:ae1bf6a140e322962f65b2c98dc07a3ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random number not given before.  <a href="#ae1bf6a140e322962f65b2c98dc07a3ac">More...</a><br /></td></tr>
<tr class="separator:ae1bf6a140e322962f65b2c98dc07a3ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ba0925ac2e14881505a9575466ddc4f"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8ba0925ac2e14881505a9575466ddc4f">left</a> () const</td></tr>
<tr class="memdesc:a8ba0925ac2e14881505a9575466ddc4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of values still to be returned.  <a href="#a8ba0925ac2e14881505a9575466ddc4f">More...</a><br /></td></tr>
<tr class="separator:a8ba0925ac2e14881505a9575466ddc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18f74b44fe6747fa3498bdbe6422648e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a18f74b44fe6747fa3498bdbe6422648e">operator=</a> (const <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a> &amp;rnd)</td></tr>
<tr class="memdesc:a18f74b44fe6747fa3498bdbe6422648e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies a randomizer.  <a href="#a18f74b44fe6747fa3498bdbe6422648e">More...</a><br /></td></tr>
<tr class="separator:a18f74b44fe6747fa3498bdbe6422648e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a315e00744de8bb3794d154797d02ec1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a315e00744de8bb3794d154797d02ec1f">reset</a> ()</td></tr>
<tr class="memdesc:a315e00744de8bb3794d154797d02ec1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the randomizer as it were just created.  <a href="#a315e00744de8bb3794d154797d02ec1f">More...</a><br /></td></tr>
<tr class="separator:a315e00744de8bb3794d154797d02ec1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae073cba77da776dae607f22fd289b220"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#ae073cba77da776dae607f22fd289b220">UnrepeatedRandomizer</a> (int min, int max)</td></tr>
<tr class="memdesc:ae073cba77da776dae607f22fd289b220"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a randomizer that returns numbers in the range [min, max].  <a href="#ae073cba77da776dae607f22fd289b220">More...</a><br /></td></tr>
<tr class="separator:ae073cba77da776dae607f22fd289b220"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4d4b9621cb9a55ec59fb311798a3a5b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#af4d4b9621cb9a55ec59fb311798a3a5b">UnrepeatedRandomizer</a> (const <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a> &amp;rnd)</td></tr>
<tr class="memdesc:af4d4b9621cb9a55ec59fb311798a3a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies a randomizer.  <a href="#af4d4b9621cb9a55ec59fb311798a3a5b">More...</a><br /></td></tr>
<tr class="separator:af4d4b9621cb9a55ec59fb311798a3a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d523a848ff349c73da7499167c2c637"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8d523a848ff349c73da7499167c2c637">~UnrepeatedRandomizer</a> ()</td></tr>
<tr class="separator:a8d523a848ff349c73da7499167c2c637"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a583497053acec6991b9a872f924e8ccb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a583497053acec6991b9a872f924e8ccb">createValues</a> ()</td></tr>
<tr class="memdesc:a583497053acec6991b9a872f924e8ccb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the vector with available values.  <a href="#a583497053acec6991b9a872f924e8ccb">More...</a><br /></td></tr>
<tr class="separator:a583497053acec6991b9a872f924e8ccb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a5c2d23ba34589d23ac131e37feac6f6b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a5c2d23ba34589d23ac131e37feac6f6b">m_max</a></td></tr>
<tr class="memdesc:a5c2d23ba34589d23ac131e37feac6f6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max of range of values.  <a href="#a5c2d23ba34589d23ac131e37feac6f6b">More...</a><br /></td></tr>
<tr class="separator:a5c2d23ba34589d23ac131e37feac6f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b59cc2afb7d7db20aa048ea95365134"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a7b59cc2afb7d7db20aa048ea95365134">m_min</a></td></tr>
<tr class="memdesc:a7b59cc2afb7d7db20aa048ea95365134"><td class="mdescLeft">&#160;</td><td class="mdescRight">Min of range of values.  <a href="#a7b59cc2afb7d7db20aa048ea95365134">More...</a><br /></td></tr>
<tr class="separator:a7b59cc2afb7d7db20aa048ea95365134"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbe23146bfc61994e361d356282ce6c4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#adbe23146bfc61994e361d356282ce6c4">m_values</a></td></tr>
<tr class="memdesc:adbe23146bfc61994e361d356282ce6c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Available values.  <a href="#adbe23146bfc61994e361d356282ce6c4">More...</a><br /></td></tr>
<tr class="separator:adbe23146bfc61994e361d356282ce6c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides pseudo-random numbers with no repetitions. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae073cba77da776dae607f22fd289b220"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DUtils::Random::UnrepeatedRandomizer::UnrepeatedRandomizer </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a randomizer that returns numbers in the range [min, max]. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td></td></tr>
    <tr><td class="paramname">max</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8d523a848ff349c73da7499167c2c637"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DUtils::Random::UnrepeatedRandomizer::~UnrepeatedRandomizer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="af4d4b9621cb9a55ec59fb311798a3a5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DUtils::Random::UnrepeatedRandomizer::UnrepeatedRandomizer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a> &amp;&#160;</td>
          <td class="paramname"><em>rnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copies a randomizer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rnd</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a583497053acec6991b9a872f924e8ccb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void DUtils::Random::UnrepeatedRandomizer::createValues </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates the vector with available values. </p>

</div>
</div>
<a id="a4f93a3ab99e3e801d0c1d2599917a37a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DUtils::Random::UnrepeatedRandomizer::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns whether all the possible values between min and max were already given. </p>
<p>If <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#ae1bf6a140e322962f65b2c98dc07a3ac" title="Returns a random number not given before. ">get()</a> is called when <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a4f93a3ab99e3e801d0c1d2599917a37a" title="Returns whether all the possible values between min and max were already given. ">empty()</a> is true, the behaviour is the same than after creating the randomizer </p><dl class="section return"><dt>Returns</dt><dd>true iff all the values were returned </dd></dl>

</div>
</div>
<a id="ae1bf6a140e322962f65b2c98dc07a3ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DUtils::Random::UnrepeatedRandomizer::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a random number not given before. </p>
<p>If all the possible values were already given, the process starts again </p><dl class="section return"><dt>Returns</dt><dd>unrepeated random number </dd></dl>

</div>
</div>
<a id="a8ba0925ac2e14881505a9575466ddc4f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int DUtils::Random::UnrepeatedRandomizer::left </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of values still to be returned. </p>
<dl class="section return"><dt>Returns</dt><dd>amount of values to return </dd></dl>

</div>
</div>
<a id="a18f74b44fe6747fa3498bdbe6422648e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">DUtils::Random::UnrepeatedRandomizer</a> &amp; DUtils::Random::UnrepeatedRandomizer::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a> &amp;&#160;</td>
          <td class="paramname"><em>rnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copies a randomizer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rnd</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a315e00744de8bb3794d154797d02ec1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DUtils::Random::UnrepeatedRandomizer::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets the randomizer as it were just created. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a5c2d23ba34589d23ac131e37feac6f6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int DUtils::Random::UnrepeatedRandomizer::m_max</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Max of range of values. </p>

</div>
</div>
<a id="a7b59cc2afb7d7db20aa048ea95365134"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int DUtils::Random::UnrepeatedRandomizer::m_min</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Min of range of values. </p>

</div>
</div>
<a id="adbe23146bfc61994e361d356282ce6c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;int&gt; DUtils::Random::UnrepeatedRandomizer::m_values</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Available values. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/alejandro/Desarrollo eclipse/os1/Thirdparty/DBoW2/DUtils/<a class="el" href="_random_8h_source.html">Random.h</a></li>
<li>/home/alejandro/Desarrollo eclipse/os1/Thirdparty/DBoW2/DUtils/<a class="el" href="_random_8cpp.html">Random.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_d_utils.html">DUtils</a></li><li class="navelem"><a class="el" href="class_d_utils_1_1_random.html">Random</a></li><li class="navelem"><a class="el" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
